﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Ubatic.Ui.Web.Classes
{
    public enum OptionCrud
    {
        None = 0,
        Create,
        Delete,
        Update,
        View
    }

    public class OptionCrudHelper
    {
        public static OptionCrud ConvertToEnum(string option)
        {
            OptionCrud optionCrud = OptionCrud.None;
            switch (option)
            {
                case "Create":
                    optionCrud = OptionCrud.Create;
                    break;
                case "View":
                    optionCrud = OptionCrud.View;
                    break;
                case "Update":
                    optionCrud = OptionCrud.Update;
                    break;
                case "Delete":
                    optionCrud = OptionCrud.Delete;
                    break;
            }
            return optionCrud;
        }
    }
}